package com.css.common.core.constant;

import com.css.common.core.utils.BaseUtil;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.List;

@Data
@AllArgsConstructor
public class DataList<T> {
    @JsonProperty("pageSize")
    private Long pageSize;
    @JsonProperty("total")
    private Long total;
    @JsonProperty("list")
    private List<T> list;

    /**
     * 是否存在数据
     */
    public boolean existList(){
        return !BaseUtil.isNull(list);
    }
}
